Skip to content

Move French accelerated depreciation to W1 base application#9090

Open
ventselartur wants to merge 1 commit into
mainfrom
features/617319-MoveFrenchAcceleratedDepreciationToW1BaseApp
Open

Move French accelerated depreciation to W1 base application#9090
ventselartur wants to merge 1 commit into
mainfrom
features/617319-MoveFrenchAcceleratedDepreciationToW1BaseApp

Conversation

@ventselartur

@ventselartur ventselartur commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Why

French Fixed Assets relies on "accelerated depreciation" (amortissement dérogatoire /
derogatory depreciation), which today exists only in the FR local Base Application layer.
This deliverable moves that capability into the W1 Base Application so derogatory
depreciation becomes a first-class, cross-localization feature. New W1 fields, accounts,
and posting logic are introduced, the FR-specific fields and code are obsoleted (CLEAN29),
and existing FR data is migrated into the new W1 fields through Feature Management so no
customer data is lost.

Summary

  • Added W1 derogatory depreciation logic — new fields and posting behavior across
    Depreciation Book, FA Depreciation Book, FA Posting Group, FA Ledger Entry, Gen. Journal
    Line, Posted Gen. Journal Line, and FA Reclass. Journal Line in the W1 Base Application.
  • Added the AcceleratedDepreciation Feature Management feature (Accelerated Depr. Feature + Feature - Accelerated Depr. enum extension) with a data-update task that
    copies existing FR field values into the new W1 fields and reports affected records.
  • Added Upgrade Accelerated Depr. upgrade codeunit and Upg. Tag Accelerated Depr.
    upgrade tag to migrate data and mark completion when the feature becomes default (v31.0).
  • Obsoleted the FR-local derogatory fields, accounts, and code under CLEAN29, pending
    removal once the feature is always-on in version 31.0.
  • Moved FR derogatory/local Fixed Asset tests into the W1 test layer (derogatory
    depreciation, feature bugs, local fixed assets, and UT COD/REP/TAB suites).
  • Propagated the W1 changes through the country Base Application layers (AU, CA, CZ, DE,
    DK, ES, FI, GB, IT, NL, NO, RU, US) and updated Contoso demo data / GL account helpers.

Fixes AB#617319

@ventselartur ventselartur requested review from a team July 3, 2026 21:49
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 3, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 3, 2026
TransferFields(Database::"Posted Gen. Journal Line", 10861, 5865); // 10861 - the existing field "Derogatory Line", 5865 - the new field "Is Derogatory";
TransferFields(Database::"Depreciation Book", 10800, 5865); // 10800 - the existing field "Derogatory Calculation", 5865 - the new field "Derogatory Calc.";
TransferFields(Database::"Depreciation Book", 10802, 5867); // 10802 - the existing field "G/L Integration - Derogatory", 5867 - the new field "Integration G/L - Derogatory";
TransferFields(Database::"FA Depreciation Book", 10801, 5865); // 10801 - the existing field "Last Derogatory Date", 5865 - the new field "Derogatory Amount";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Agent} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

The FA Depreciation Book migration maps old field 10801 Last Derogatory Date into new field 5865 Derogatory Amount, but 5865 is the new FlowField and the persisted replacement date field is 5866 Last Derogatory.

As written, existing dates are not migrated to the new stored field. Change this transfer to target 5866.

Suggested change
TransferFields(Database::"FA Depreciation Book", 10801, 5865); // 10801 - the existing field "Last Derogatory Date", 5865 - the new field "Derogatory Amount";
TransferFields(Database::"FA Depreciation Book", 10801, 5866); // 10801 - the existing field "Last Derogatory Date", 5866 - the new field "Last Derogatory";

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

SourceFieldRef := RecRef.Field(SourceFieldNo);
SourceFieldRef.SetFilter('<>%1', '');

if RecRef.FindSet() then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟠\ High\ Severity\ —\ Other} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

The upgrade helper migrates moved fields with a row-by-row `FindSet() ...

Modify(false)loop. That is the anti-pattern called out for new fields on existing tables, and here it runs against tenant-scale tables such asFA Ledger EntryandPosted Gen. Journal Line. Replace the generic loop with set-based DataTransfer` migrations.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 1 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Findings by domain

Findings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).

Domain Findings Knowledge-backed Agent Inline Fallback
Agent 1 0 1 1 0
Other 1 1 0 1 0

Totals: 1 knowledge-backed · 1 agent findings.

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant